import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: () => import('@/views/Check.vue'),
    },
    {
        path: '/auth',
        component: () => import('@/views/Auth.vue'),
    },
    {
        path: '/index',
        component: () => import('@/views/Main.vue'),
        hidden: true,
        children: [
            {
                path: '/fundbuy',
                component: () => import('@/views/FundBuy.vue'),
            },
            {
                path: '/fundsell',
                component: () => import('@/views/FundSell.vue'),
            },
            {
                path: '/funddetail',
                component: () => import('@/views/FundDetail.vue'),
            }, {
                path: '/fundquery',
                component: () => import('@/views/FundQuery.vue'),
            },{
                path: '/tradingrecordquery',
                component: () => import('@/views/TradingRecordQuery.vue'),
            }, {
                path: '/rechargewithdrawalquery',
                component: () => import('@/views/RechargeWithDrawalQuery.vue'),
            }, {
                path: '/customeraccountopening',
                component: () => import('@/views/CustomerAccountOpening.vue'),
            },

        ]
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router